package com.an.blog.web.domain.bo;


import com.an.common.constant.UserConstants;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;


/**
 * 博客忘记了用户业务对象
 *
 * @author: Ann
 * @createDate: 2023/08/03 13:29:53
 * @version: 1.0.0
 */
@Data
public class BlogForgetUserBo implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 电子邮件地址
     */
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    @Size(max = 50, message = "邮箱长度不能超过{max}个字符")
    private String email;


    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "{blog.web.user.password.length.valid}")
    private String password;

    /**
     * 确保密码
     */
    @NotBlank(message = "确认密码不能为空")
    private String ensurePassword;

    /**
     * 验证码
     */
    @NotBlank(message = "验证码不能为空")
    private String code;

}
